﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProjectEuler.Runtime
{
    internal sealed class Contract
    {
        public static void EnsureNotNegative(String paramName, Int32 value)
        {
            if (value < 0)
            {
                throw new ArgumentOutOfRangeException(paramName);
            }
        }

        public static void EnsureNotNull(String paramName, Object arg)
        {
            if (arg == null)
            {
                throw new ArgumentNullException(paramName);
            }
        }

    }
}
